package com.demo2do.fms.entity.vehicle.tractor;

import org.apache.commons.lang3.StringUtils;

import com.demo2do.core.utils.Alias;

/**
 * 牵引车-车辆类型（行驶证）
 *
 * @author Ark
 *
 */
@Alias("TractorVehicleType")
public enum TractorVehicleType {

    HEAVY_SEMITRAILER("重型半挂牵引车"),
    
    HEAVY_SPECIAL_TRUCK("重型特殊结构货车"),
    
    MEDIUM_NON_CARGO("中型非载货专项作业车"),
    
    HEAVY_TRANSPORT_TRACTOR("重型车辆运输车");
    
    private String description;

    /**
     * @param description
     */
    private TractorVehicleType(String description) {
        this.description = description;
    }
    
    /**
     * @param description
     * @return
     */
    public static TractorVehicleType descriptionOf(String description) {
        for (TractorVehicleType vehicleType : TractorVehicleType.values()) {
            if (StringUtils.equals(vehicleType.getDescription(), description)) {
                return vehicleType;
            }
        }
        return null;
    }

    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }
    
}
